#! /usr/bin/env bash

#--------------------
# Standard options:
export FF_CFG_FLAGS=

# Licensing options:
export FF_CFG_FLAGS="$FF_CFG_FLAGS --disable-gpl"
export FF_CFG_FLAGS="$FF_CFG_FLAGS --disable-nonfree"

# Configuration options:
# export FF_CFG_FLAGS="$FF_CFG_FLAGS --enable-small"
export FF_CFG_FLAGS="$FF_CFG_FLAGS --enable-runtime-cpudetect"
export FF_CFG_FLAGS="$FF_CFG_FLAGS --disable-gray"
export FF_CFG_FLAGS="$FF_CFG_FLAGS --disable-swscale-alpha"

# Program options:
export FF_CFG_FLAGS="$FF_CFG_FLAGS --disable-programs"
export FF_CFG_FLAGS="$FF_CFG_FLAGS --disable-ffmpeg"
export FF_CFG_FLAGS="$FF_CFG_FLAGS --disable-ffplay"
export FF_CFG_FLAGS="$FF_CFG_FLAGS --disable-ffprobe"

# Documentation options:
export FF_CFG_FLAGS="$FF_CFG_FLAGS --disable-doc"
export FF_CFG_FLAGS="$FF_CFG_FLAGS --disable-htmlpages"
export FF_CFG_FLAGS="$FF_CFG_FLAGS --disable-manpages"
export FF_CFG_FLAGS="$FF_CFG_FLAGS --disable-podpages"
export FF_CFG_FLAGS="$FF_CFG_FLAGS --disable-txtpages"

# Component options:
export FF_CFG_FLAGS="$FF_CFG_FLAGS --disable-avdevice"
export FF_CFG_FLAGS="$FF_CFG_FLAGS --enable-avcodec"
export FF_CFG_FLAGS="$FF_CFG_FLAGS --enable-avformat"
export FF_CFG_FLAGS="$FF_CFG_FLAGS --enable-avutil"
export FF_CFG_FLAGS="$FF_CFG_FLAGS --enable-swresample"
export FF_CFG_FLAGS="$FF_CFG_FLAGS --enable-swscale"
export FF_CFG_FLAGS="$FF_CFG_FLAGS --disable-postproc"
export FF_CFG_FLAGS="$FF_CFG_FLAGS --enable-avfilter"
export FF_CFG_FLAGS="$FF_CFG_FLAGS --disable-avresample"
export FF_CFG_FLAGS="$FF_CFG_FLAGS --enable-network"

# Hardware accelerators:
export FF_CFG_FLAGS="$FF_CFG_FLAGS --disable-dxva2"
export FF_CFG_FLAGS="$FF_CFG_FLAGS --disable-vaapi"
export FF_CFG_FLAGS="$FF_CFG_FLAGS --disable-vdpau"

# External library support:
export FF_CFG_FLAGS="$FF_CFG_FLAGS --disable-iconv"


# 首先禁用所有功能
export FF_CFG_FLAGS="$FF_CFG_FLAGS --disable-everything"

# # 解码器
# export FF_CFG_FLAGS="$FF_CFG_FLAGS --enable-decoder=aac"
# export FF_CFG_FLAGS="$FF_CFG_FLAGS --enable-decoder=h264"

# 编码器
# export FF_CFG_FLAGS="$FF_CFG_FLAGS --enable-encoder=aac"
# export FF_CFG_FLAGS="$FF_CFG_FLAGS --enable-encoder=mpeg4"
export FF_CFG_FLAGS="$FF_CFG_FLAGS --enable-encoder=jpeg2000"
export FF_CFG_FLAGS="$FF_CFG_FLAGS --enable-encoder=jpegls"
export FF_CFG_FLAGS="$FF_CFG_FLAGS --enable-encoder=mjpeg"

# # muxers
# export FF_CFG_FLAGS="$FF_CFG_FLAGS --enable-muxer=h264"
# export FF_CFG_FLAGS="$FF_CFG_FLAGS --enable-muxer=mp4"
export FF_CFG_FLAGS="$FF_CFG_FLAGS --enable-muxer=mjpeg"

# # demuxers
# export FF_CFG_FLAGS="$FF_CFG_FLAGS --enable-demuxer=aac"
# export FF_CFG_FLAGS="$FF_CFG_FLAGS --enable-demuxer=h264"

# parsers

# protocols
export FF_CFG_FLAGS="$FF_CFG_FLAGS --enable-protocol=async"
export FF_CFG_FLAGS="$FF_CFG_FLAGS --enable-protocol=cache"
export FF_CFG_FLAGS="$FF_CFG_FLAGS --enable-protocol=file"

# filters
export FF_CFG_FLAGS="$FF_CFG_FLAGS --enable-filter=crop"
export FF_CFG_FLAGS="$FF_CFG_FLAGS --enable-filter=scale"

# bsfs